package com.lkei.service.impl;

import com.lkei.dao.TopicDAO;
import com.lkei.entity.Topic;
import com.lkei.service.TopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("topicService")
public class TopicServiceImpl implements TopicService {
    @Autowired
    private TopicDAO topicDAO;

    @Override
    public List<Topic> findAllTopic() {
        return topicDAO.findAllTopic();
    }

    @Override
    public void addTopic(Topic topic) {
        topicDAO.addTopic(topic);
    }

    @Override
    public Topic findTopicById(String tno){
        return topicDAO.findTopicById(tno);
    }
}